<template>
	<view class="classify-container PageBg">
		<view class="custom-nav">
			<custom-nav-bar title="分类"></custom-nav-bar>
		</view>
		<view class="classify-main">
			<theme-item :url="item.picurl" :id="item._id"   v-for="item in classifyList" :time="item.updateTime" :key="item._id" :name="item.name"></theme-item>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { ref } from "vue";
import customNavBar from "../../components/custom-nav-bar/custom-nav-bar.vue"
import { IClassify } from "../../api/type";
import { apiGetClassify } from "../../api/apis";
	let classifyList = ref<IClassify[]>([])
	getClassify()
	async function getClassify(){
		let res = await apiGetClassify({select:true})
		classifyList.value = res;
	}
</script>

<style lang="scss" scoped>
	       .classify-main{
			   padding: 30rpx;
			   display: grid;
			   grid-template-columns: repeat(3,1fr);
			   gap: 15rpx;
		   }
</style>
